package cn.lingyangwl.agile.auth.third;

import cn.lingyangwl.agile.infra.InfraApi;
import cn.lingyangwl.agile.infra.common.ScanScene;
import cn.lingyangwl.agile.model.module.auth.GrantTypeEnum;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 微信公众号二维码授权, 主要用于pc端登录
 *
 * @author shenguangyang
 */
@Component
public class WxMpScanAuth extends BaseThirdAuth {
    @Resource
    private InfraApi infraApi;

    @Override
    public GrantTypeEnum grantType() {
        return GrantTypeEnum.WEXIN_MP_SCAN;
    }

    @Override
    protected String doGetLoginQrcodeUrl(ScanScene req) {
        return infraApi.getMpQrcode(req);
    }
}
